package com.itheima.object1;

public class Student {
    //属性: 姓名,年龄
    //成员变量: 跟之前定义变量的格式一样,只不过位置发生了必变,类中方法外
    private String name;
    private String age;

     //行为: 学习
    //成员方法: 跟之前定义的方法格式一样,只不过去掉了static关键字

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public Student(String name, String age) {
        this.name = name;
        this.age = age;
    }

    public Student() {
    }

    public void study() {
        System.out.println("学习");
    }

}
